package mutsumimod.powers;

import com.megacrit.cardcrawl.actions.common.ReducePowerAction;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import mutsumimod.MutsumiMod;

public class PlayIsOverPower extends BasePower {
    public static final String POWER_ID = MutsumiMod.makeID(PlayIsOverPower.class.getSimpleName());

    public PlayIsOverPower(AbstractCreature owner,int amount) {
        super(POWER_ID, PowerType.DEBUFF, false, owner, amount);
    }

    @Override
    public void onTriggerStand(int standAmount,int targetAmount) {
        if(AbstractDungeon.player.hasPower(StandPower.POWER_ID)){
            flash();
            addToTop(new ReducePowerAction(AbstractDungeon.player,AbstractDungeon.player,StandPower.POWER_ID,amount));
        }
    }

    @Override
    public void updateDescription() {
        this.description = DESCRIPTIONS[0] + this.amount + DESCRIPTIONS[1];
    }

}
